package cn.ltgodm.moj.service;

import cn.ltgodm.moj.common.ErrorCode;
import cn.ltgodm.moj.constant.UserConstant;
import cn.ltgodm.moj.exception.BusinessException;
import cn.ltgodm.moj.model.entity.Question;
import cn.ltgodm.moj.model.entity.QuestionSubmit;
import cn.ltgodm.moj.model.entity.User;
import cn.ltgodm.moj.model.enums.UserRoleEnum;
import cn.ltgodm.moj.model.vo.LoginUserVO;
import cn.ltgodm.moj.model.vo.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Collection;
import java.util.List;

/**
 * 用户服务
 *
 * @author ltgodm
 * @date 2024-03-13 13:58:53
 */
@FeignClient(name = "moj-backend-question-service", path = "/api/question")
public interface QuestionFeignClient {

    @GetMapping("/inner/get")
    Question getQuestionById(@RequestParam("questionId") Long questionId);

    @PostMapping("/inner/update")
    boolean updateQuestionById(@RequestBody Question question);

    @GetMapping("submit/inner/get")
    QuestionSubmit getQuestionSubmitById(@RequestParam("questionSubmitId") Long questionSubmitId);

    @PostMapping("/submit/inner/update")
    boolean updateQuestionSubmitById(@RequestBody QuestionSubmit questionSubmit);
}
